<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt"%>
<!DOCTYPE HTML>
<html>
  <head>
    <title>主页</title>
  </head>
  
  <body>
  <form  action="${pageContext.request.contextPath }/index/searchByName" method="post">
  	<input type="text" name="name" >按名字查询
  </form>
    <form  action="${pageContext.request.contextPath }/index/searchByGroupId" method="post">
  	<input type="text" name="groupId" >按项目ID查询
  </form>
	<table width="100%" border=1>
	<tr>
		<td>选择</td>
		<td>学号</td>
		<td>学生姓名</td>
		<td>所在班级</td>
		<td>phone</td>
		<td>qq</td>
		<td>email</td>
		<td>state</td>
		<td>groupId</td>
		<td>sex</td>
	</tr>
	<c:forEach items="${studentList}" var="item">
	<tr>	
		<td><input type="checkbox" name="id" value="${item.id}"/></td>
		<td>${item.studentId }</td>
		<td>${item.studentName}</td>
		<td>${item.classId }</td>
		<td>${item.phone }</td>
		<td>${item.qq }</td>
		<td>${item.email }</td>
		<td>${item.state }</td>
		<td>${item.groupId }</td>
		<td>${item.sex }</td>
	</tr>
	</c:forEach>
	</table>

  </body>
</html>
